package com.sise.controller.wechat;

import com.sise.entity.UserSearchRecord;
import com.sise.service.IUserSearchRecordService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author zj
 */
@RestController
@RequestMapping("/sise/wechat/user-search-record")
public class WechatUserSearchRecordController {

    @Resource
    private IUserSearchRecordService userSearchRecordService;

    @PostMapping("/addUserSearchRecord")
    public String addUserSearchRecord(@RequestBody UserSearchRecord userSearchRecord) {
        boolean isSave = userSearchRecordService.save(userSearchRecord);
        if (isSave) {
            return "添加成功！";
        }
        return "添加失败！";
    }


}
